#ifndef MqttInterfaceImpl_H
#define MqttInterfaceImpl_H
#include <iostream>
#include <atomic>
#include <memory>
#include "subcallback.h"
#include "async_client.h"

using namespace std;

class MqttInterfaceImpl
{
public:
    MqttInterfaceImpl();

    int pub_init(const std::string& address, const std::string& clientID,
                 const std::string& PERSIST_DIR);

    int pub_data(const std::string & topic, const std::string& data,
                 const int qos);

private:
    mqtt::message_ptr pubmsg;
    std::shared_ptr<mqtt::async_client> m_pub_client;
    std::shared_ptr<mqtt::async_client> m_sub_client;

};

#endif // MqttInterfaceImpl_H
